from distutils.core import setup
from distutils.extension import Extension

counter = Extension(
                    "bam_counter.counter",
                    ["bam_counter/counter.c"],
                    include_dirs=['bam_counter', 'include/pysam', 'include/samtools']
                    )

bam_counter = Extension(
                        "bam_counter.base_counter",
                        ["bam_counter/base_counter.c"],
                        include_dirs=['bam_counter', 'include/pysam', 'include/samtools']
                        )

joint_bin_counter = Extension(
                              "bam_counter.joint_binary_counter",
                              ["bam_counter/joint_binary_counter.c"],
                              include_dirs=['bam_counter', 'include/pysam', 'include/samtools']
                              )

positions_iterator = Extension(
                               "bam_counter.positions_iterator",
                               ["bam_counter/positions_iterator.c"],
                               include_dirs=['bam_counter', 'include/pysam', 'include/samtools']
                               )

paired_base_counter = Extension(
                                "bam_counter.paired_base_counter",
                                ["bam_counter/paired_base_counter.c"],
                                include_dirs=['bam_counter', 'include/pysam', 'include/samtools']
                                )

ref_map = Extension(
                    "bam_counter.ref_map",
                    ["bam_counter/ref_map.c"],
                    include_dirs=['bam_counter', 'include/pysam', 'include/samtools']
                    )

ext_modules = [ counter, bam_counter, joint_bin_counter, positions_iterator, paired_base_counter, ref_map]

setup(
      name='BamCounter',
      version='0.1',
      description='Python utility for converting bam files to base counts.',
      author='Andrew Roth',
      author_email='andrewjlroth@gmail.com',
      url='http://compbio.bccrc.ca',
      
      packages=[ 
                'bam_counter'              
                ],
      
      scripts=['scripts/paired_bam_to_binary_counts.py',
               'scripts/paired_dna_rna_seq_to_counts.py'],
      
      ext_modules=ext_modules
     )
